<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style type="text/css">
	div{
		width: 300px;
		height: 200px;
		border: 2px solid blue;
	}
</style>
<script type="text/javascript">
window.onload = function(){
	var btn = document.getElementById('btn');
	var box1 = document.getElementById('box1');
	var box2 = document.getElementById('box2');

	// 给按钮加单击事件
	btn.onclick = function(){
		// 先获得box1的内容
		var con = box1.innerHTML;
		// 将box1的内容写入到box2中
		box2.innerHTML = con;
		// 将box1的内容清空
		box1.innerHTML = '';
	}
}
</script>
</head>

<body>


<div id="box1">
	跑来跑去~~跑来跑去~~跑来跑去~~跑来跑去~~跑来跑去~~跑来跑去~~跑来跑去~~跑来跑去~~跑来跑去~~跑来跑去~~跑来跑去~~跑来跑去~~跑来跑去~~跑来跑去~~跑来跑去~~跑来跑去~~跑来跑去~~跑来跑去~~跑来跑去~~跑来跑去~~跑来跑去~~跑来跑去~~跑来跑去~~跑来跑去~~
</div>

<br /><br />

<input type="button" value="乾坤大挪移" id="btn" />

<br /><br />

<div id="box2"></div>




</body>
</html>
